﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;

namespace TEMS
{
    public static class WaitWin
    {
        static FormWait form = null;
        public static void Show(string waitMsg)
        {
            if (form == null)
            {
                form = new FormWait();
                ThreadPool.QueueUserWorkItem(state =>
                {
                    form.ShowDialog();
                });
            }
            form.Msg = waitMsg;
        }
        public static void Close()
        {
            if (form != null)
                form.Close();
            form = null;
        }
    }
}
